<%@page import="Bean.MemberBean"%>
<%@page import="DBMGR.DBMgr"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%
	String id = request.getParameter("id");
	String pw = request.getParameter("pw");
	String name = request.getParameter("name");
	String age = request.getParameter("age");
	String gender = request.getParameter("gender");
	String email = request.getParameter("email");
	
	DBMgr mgr = new DBMgr();
	MemberBean bean = new MemberBean(id, pw, name, Integer.parseInt(age), gender, email);
	if(mgr.join(bean)){
		session.setAttribute("id", id);
		response.sendRedirect("joinResult.jsp");
	}else{
		response.sendRedirect("joinForm");
	}
%>  	    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>

</body>
</html>